import request from '@/request/request.js'

// 用户登录
export const weixinLogin = (params) => {
	return request({
		url: "/api/user/login",
		method: "post",
		data: params,
	})
}

// 退出登录
export const logout = (params) => {
	return request({
		url: "/api/user/logout",
		method: "post",
		data: params,
	})
}

// 修改密码
export const resetpwd = (params) => {
	return request({
		url: "/api/user/resetpwd",
		method: "post",
		data: params,
	})
}

// 我的佣金
export const commissionList = (params) => {
	return request({
		url: "/api/commission/list",
		method: "post",
		data: params,
	})
}

// 新增银行卡
export const addBank = (params) => {
	return request({
		url: "/api/commission/add_bank",
		method: "post",
		data: params,
	})
}

// 银行卡列表
export const bankList = (params) => {
	return request({
		url: "/api/commission/bank_list",
		method: "post",
		data: params,
	})
}
// 银行列表
export const commissionBank = (params) => {
	return request({
		url: "/api/commission/bank",
		method: "post",
		data: params,
	})
}
// 删除银行卡
export const bankDel = (params) => {
	return request({
		url: "/api/commission/del",
		method: "post",
		data: params,
	})
}
// 提现
export const withdraw = (params) => {
	return request({
		url: "/api/commission/add",
		method: "post",
		data: params,
	})
}

// 获取二维码
export const qrcode = (params) => {
	return request({
		url: "/api/config/qrcode",
		method: "post",
		data: params,
	})
}

// 获取用户信息
export const getuserinfo = (params) => {
	return request({
		url: "/api/user/user_info",
		method: "get",
		data: params,
	})
}

// 上传图片
export const upload = (params) => {
	return request({
		url: "/api/index/upload",
		method: "post",
		data: params,
	})
}

// 修改用户信息
export const userUpdate = (params) => {
	return request({
		url: "/api/user/profile",
		method: "post",
		data: params,
	})
}

